using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Zonal
{
    /// <summary>
    /// <para>Tabulate Area</para>
    /// <para>Calculates cross-tabulated areas between two datasets and outputs a table.</para>
    /// <para>计算两个数据集之间的交叉制表面积并输出表。</para>
    /// </summary>    
    [DisplayName("Tabulate Area")]
    public class TabulateArea : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public TabulateArea()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_zone_data">
        /// <para>Input raster or feature zone data</para>
        /// <para><xdoc>
        ///   <para>The dataset that defines the zones.</para>
        ///   <para>The zones can be defined by an integer raster or a feature layer.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义区域的数据集。</para>
        ///   <para>区域可由整数栅格或要素图层定义。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_zone_field">
        /// <para>Zone field</para>
        /// <para><xdoc>
        ///   <para>The field that contains the values that define each zone.</para>
        ///   <para>It can be an integer or a string field of the zone dataset.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含定义每个区域的值的字段。</para>
        ///   <para>它可以是区域数据集的整数或字符串字段。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_class_data">
        /// <para>Input raster or feature class data</para>
        /// <para><xdoc>
        ///   <para>The dataset that defines the classes that will have their area summarized within each zone.</para>
        ///   <para>The class input can be an integer raster layer or a feature layer.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义将在每个区域中汇总其区域的类的数据集。</para>
        ///   <para>类输入可以是整数栅格图层或要素图层。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_class_field">
        /// <para>Class field</para>
        /// <para><xdoc>
        ///   <para>The field that holds the class values.</para>
        ///   <para>It can be an integer or a string field of the input class data.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>保存类值的字段。</para>
        ///   <para>它可以是输入类数据的整数或字符串字段。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_table">
        /// <para>Output table</para>
        /// <para><xdoc>
        ///   <para>The output table that will contain the summary of the area of each class in each zone.</para>
        ///   <para>The format of the table is determined by the output location and path. By default, the output will be a geodatabase table if in a geodatabase workspace, and a dBASE table if in a file workspace.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出表，其中包含每个区域中每个类的面积摘要。</para>
        ///   <para>表的格式由输出位置和路径决定。默认情况下，输出将为地理数据库表（如果位于地理数据库工作空间中），如果输出为dBASE表（如果位于文件工作空间中）。</para>
        /// </xdoc></para>
        /// </param>
        public TabulateArea(object _in_zone_data, object _zone_field, object _in_class_data, object _class_field, object _out_table)
        {
            this._in_zone_data = _in_zone_data;
            this._zone_field = _zone_field;
            this._in_class_data = _in_class_data;
            this._class_field = _class_field;
            this._out_table = _out_table;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Tabulate Area";

        public override string CallName => "sa.TabulateArea";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "qualifiedFieldNames", "scratchWorkspace", "snapRaster", "tileSize", "transferDomains", "workspace"];

        public override object[] ParameterInfo => [_in_zone_data, _zone_field, _in_class_data, _class_field, _out_table, _processing_cell_size, _classes_as_rows.GetGPValue()];

        /// <summary>
        /// <para>Input raster or feature zone data</para>
        /// <para><xdoc>
        ///   <para>The dataset that defines the zones.</para>
        ///   <para>The zones can be defined by an integer raster or a feature layer.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义区域的数据集。</para>
        ///   <para>区域可由整数栅格或要素图层定义。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster or feature zone data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_zone_data { get; set; }


        /// <summary>
        /// <para>Zone field</para>
        /// <para><xdoc>
        ///   <para>The field that contains the values that define each zone.</para>
        ///   <para>It can be an integer or a string field of the zone dataset.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含定义每个区域的值的字段。</para>
        ///   <para>它可以是区域数据集的整数或字符串字段。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Zone field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _zone_field { get; set; }


        /// <summary>
        /// <para>Input raster or feature class data</para>
        /// <para><xdoc>
        ///   <para>The dataset that defines the classes that will have their area summarized within each zone.</para>
        ///   <para>The class input can be an integer raster layer or a feature layer.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义将在每个区域中汇总其区域的类的数据集。</para>
        ///   <para>类输入可以是整数栅格图层或要素图层。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster or feature class data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_class_data { get; set; }


        /// <summary>
        /// <para>Class field</para>
        /// <para><xdoc>
        ///   <para>The field that holds the class values.</para>
        ///   <para>It can be an integer or a string field of the input class data.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>保存类值的字段。</para>
        ///   <para>它可以是输入类数据的整数或字符串字段。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Class field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _class_field { get; set; }


        /// <summary>
        /// <para>Output table</para>
        /// <para><xdoc>
        ///   <para>The output table that will contain the summary of the area of each class in each zone.</para>
        ///   <para>The format of the table is determined by the output location and path. By default, the output will be a geodatabase table if in a geodatabase workspace, and a dBASE table if in a file workspace.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出表，其中包含每个区域中每个类的面积摘要。</para>
        ///   <para>表的格式由输出位置和路径决定。默认情况下，输出将为地理数据库表（如果位于地理数据库工作空间中），如果输出为dBASE表（如果位于文件工作空间中）。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_table { get; set; }


        /// <summary>
        /// <para>Processing cell size</para>
        /// <para><xdoc>
        ///   <para>The cell size of the output raster that will be created.</para>
        ///   <para>This parameter can be defined by a numeric value or obtained from an existing raster dataset. If the cell size hasn't been explicitly specified as the parameter value, the environment cell size value will be used if specified; otherwise, additional rules will be used to calculate it from the other inputs. See the usage section for more detail.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将创建的输出栅格的像元大小。</para>
        ///   <para>此参数可以由数值定义，也可以从现有栅格数据集中获取。如果尚未将像元大小显式指定为参数值，则在指定的情况下将使用环境像元大小值;否则，将使用其他规则从其他输入计算它。有关详细信息，请参阅用法部分。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Processing cell size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _processing_cell_size { get; set; } = null;


        /// <summary>
        /// <para>Classes as rows in output table</para>
        /// <para><xdoc>
        ///   <para>Specifies how the values from the input class raster will be represented in the output table.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Classes will be represented as fields. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Classes will be represented as rows.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输入类栅格中的值在输出表中的表示方式。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 类将表示为字段。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 （Checked） - 类将表示为行。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Classes as rows in output table")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _classes_as_rows_value _classes_as_rows { get; set; } = _classes_as_rows_value._false;

        public enum _classes_as_rows_value
        {
            /// <summary>
            /// <para>CLASSES_AS_FIELDS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CLASSES_AS_FIELDS")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>CLASSES_AS_ROWS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CLASSES_AS_ROWS")]
            [GPEnumValue("true")]
            _true,

        }

        public TabulateArea SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, bool? qualifiedFieldNames = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, bool? transferDomains = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, qualifiedFieldNames: qualifiedFieldNames, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, transferDomains: transferDomains, workspace: workspace);
            return this;
        }

    }

}